home *** CD-ROM | disk | FTP | other *** search
- regc4f( 5, %daycolor_r, %daycolor_g, %daycolor_b, %sunvisibility )
- regc4f( 7, %ambient_r, %ambient_g, %ambient_b, %ambient_a )
-
- pshader("
-
- ps_1_1
-
- def c1, 0, 1, 0, 0
-
- tex t0 ;Terrain color
- tex t1 ;Terrain details
- tex t2 ;Clouds
- tex t3 ;Road
-
- dp3 r0.rgb, c1, t1
-
- mul r0.rgb, t0, r0 ;kolor * detal
- +mov_x4_sat r0.a, t3.a
-
- lrp r0.rgb, r0.a, t3, r0 ;blendowanie tekstury obiektu i terenu
- +mul r0.a, t0.a, 1-t2.a ;lightmapa terenu * Chmury
-
- mad_sat r1.rgb, r0.a, c7, c7.a ;skalowanie oswietlenia (dodanie ambientu)
- +mul r1.a, t3_bx2.a, r0.a ; maska do speculara
-
- mul r1.a, r1.a, c5.a ; maska do speculara
-
- mad_sat r0, r1.a, v1, r0 ;wyciecie speculara maska i dodanie do mapy koloru
-
- mul r1, r1, c5 ;wymnozenie oswietlenia przez kolor pory dnia/swiatla
-
- mul r0, r0, r1 ;mnozymy kolory przez oswietlenie
-
- ")
-
-